<style type="text/css">

</style>

<div class="portlet">
    <form class="portlet-search-body" name="queryForm">
    	<input type="text" class="form-control search-item" ng-model="orderId" placeholder="制作单编号">
    	<select class="form-control search-item" ng-model="workGroupId"
                ng-options="opt.groupId as opt.groupName for opt in groupList">
            <option value="" disabled selected hidden>-- 制作组 --</option>
        </select>
        <select class="form-control search-item" ng-model="status"
                ng-options="opt.value as opt.name for opt in options.task_status">
            <option value="" disabled selected hidden>-- 状态 --</option>
        </select>
        <div class="search-item">
            <button class="btn btn-icon-only default"><i class="fa fa-chevron-right"></i></button>
            <button class="btn btn-sm query" ng-click="grid.query();"><i class="fa fa-search"></i> 查询</button>
            <button class="btn btn-sm reset" ng-click="grid.reset();"><i class="fa fa-eraser"></i> 重置</button>
        </div>
    </form>
    <div class="portlet-body">
        <table ed-grid="grid" class="table table-striped table-bordered table-advance table-hover"
               data-options="url: 'workbill/task/query.do?orderType={{orderType}}&workbillType={{workbillType}}', modelText: 'xx列表', form: 'queryForm', modal: 'modal'">
            <thead>
	            <tr>
	                <th data-options="field: '_index'"></th>
	                <th data-options="field: 'orderId'" style="width: 8%;">制作单号</th>
	                <th data-options="field: 'busCompany'" style="width: 7%;">所属公司</th>
					<th data-options="field: 'busLineName'" style="width: 6%;">线路</th>
					<th data-options="field: 'busPlateNo'" style="width: 6%;">车牌号</th>
					<th data-options="field: 'busVehicleNo'" style="width: 6%;">自编号</th>
					<th data-options="field: 'busType'" style="width: 6%;">车型</th>
					<th data-options="field: 'publishType | code : bus_ad_type'" style="width: 6%;">发布形式</th>
					<th data-options="field: 'adName'" style="width: 8%;">广告内容</th>
					<th data-options="field: 'stickerType | code : sticker_type'" style="width: 7%;">胶贴形式</th>
					<th data-options="field: 'stickerDate | limitTo : 10'" style="width: 7%;">交货时间</th>
	                <th data-options="field: 'taskType | code:task_type'" style="width: 6%;">类型</th>
	                <th data-options="field: 'groupName'" style="width: 6%;">制作组</th>
	                <th data-options="field: 'status | code : task_status'" style="width: 6%;">状态</th>
	                <th style="text-align: ;">操作</th>
	            </tr>
            </thead>
        </table>
    </div>
</div>

<div ed-modal="taskDealModal" data-options="title: '任务办理', static: true, width: 1000, defaultButton:false,onHidden:'reset'">
	<form style="display: none;"><div class="form-actions"></div></form>
	<div class="portlet" style="margin-bottom: 0px;">
		<div class="portlet-body">
			<div style="border: 1px solid #ddd;margin: 10px 0px;position: relative;">
				<span style="padding: 2px 5px;position: absolute;top: -10px; left:10px;background-color: #fff;">胶贴制作明细</span>
				<form class="form-horizontal">
					<div class="form-body">
						<div class="form-group">
							<label class="col-md-2 control-label">车牌号：</label>
							<div class="col-md-2">
								<p class='form-control-static'>{{orderItem.busPlateNo}}</p>
			            	</div>
			            	<label class="col-md-2 control-label">自编号：</label>
							<div class="col-md-2">
								<p class='form-control-static'>{{orderItem.busVehicleNo}}</p>
			            	</div>
			            	<label class="col-md-2 control-label">车型：</label>
							<div class="col-md-2">
								<p class='form-control-static'>{{orderItem.busType}}</p>
			            	</div>
			            </div>
			        	<div class="form-group">
							<label class="col-md-2 control-label">所属公司：</label>
							<div class="col-md-2">
								<p class='form-control-static'>{{orderItem.busCompany}}</p>
			            	</div>
			            	<label class="col-md-2 control-label">线路：</label>
							<div class="col-md-2">
								<p class='form-control-static'>{{orderItem.busLineName}}</p>
			            	</div>
			            	<label class="col-md-2 control-label">发布形式：</label>
							<div class="col-md-2">
								<p class='form-control-static'>{{orderItem.publishType | code : 'bus_ad_type'}}</p>
			            	</div>
			            </div>
			            <div class="form-group">
							<label class="col-md-2 control-label">广告内容：</label>
							<div class="col-md-2">
								<p class='form-control-static'>{{orderItem.adName}}</p>
			            	</div>
			            	<label class="col-md-2 control-label">胶贴形式：</label>
							<div class="col-md-2">
								<p class='form-control-static'>{{orderItem.stickerType | code : 'sticker_type'}}</p>
			            	</div>
			            	<label class="col-md-2 control-label">交货时间：</label>
							<div class="col-md-2">
								<p class='form-control-static'>{{orderItem.stickerDate | limitTo : 10}}</p>
			            	</div>
			            </div>
			            <div class="form-group" style="margin-bottom: 0px;">
			            	<label class="col-md-2 control-label">裁图时间：</label>
							<div class="col-md-2">
								<p class='form-control-static'>{{orderItem.caituDate | limitTo : 10}}</p>
			            	</div>
			            	<label class="col-md-2 control-label">裁图面积：</label>
							<div class="col-md-2">
								<p class='form-control-static'>{{orderItem.caituArea}}</p>
			            	</div>
			            	<label class="col-md-2 control-label">裁图员：</label>
							<div class="col-md-2">
								<p class='form-control-static'>{{orderItem.caituEmpName}}</p>
			            	</div>
			            </div>
			            <div class="form-group" style="margin-bottom: 0px;">
			            	<label class="col-md-2 control-label">打印时间：</label>
							<div class="col-md-2">
								<p class='form-control-static'>{{orderItem.printDate | limitTo : 10}}</p>
			            	</div>
			            	<label class="col-md-2 control-label">打印机号：</label>
							<div class="col-md-2">
								<p class='form-control-static'>{{orderItem.printMachineNo}}精度：{{orderItem.printAccuracy}}</p>
			            	</div>
			            	<label class="col-md-2 control-label">打印员：</label>
							<div class="col-md-2">
								<p class='form-control-static'>{{orderItem.printEmpName}}</p>
			            	</div>
			            </div>
			            <div class="form-group" style="margin-bottom: 0px;" ng-if="t.status == '2'">
			            	<label class="col-md-2 control-label">覆膜时间：</label>
							<div class="col-md-6">
								<p class='form-control-static'>{{orderItem.fumoDate | limitTo : 10}}</p>
			            	</div>
			            	<label class="col-md-2 control-label">覆膜员：</label>
							<div class="col-md-2">
								<p class='form-control-static'>{{orderItem.fumoEmpName}}</p>
			            	</div>
			            </div>
			        </div>
				</form>
			</div>
			
			
			<div style="border: 1px solid red;margin: 10px 0px;position: relative;">
				<span style="padding: 2px 5px;position: absolute;top: -10px; left:10px;background-color: #fff;color:red;">上刊制作</span>
			    <form class="form-horizontal">
					<div class="form-body">
						<div class="form-group">
							<label class="col-md-2 control-label">{{task.groupName}}：</label>
							<div class="col-md-10">
								<div class='form-control-static'>
									<a ng-repeat="emp in emps" style="margin-right: 10px;padding: 2px 5px;text-decoration: none;color:#333;"
										ng-click="emp.selected = !emp.selected"
										ng-init="emp.selected = true"
										ng-style="{'background-color': emp.selected ? 'orange' : '#ddd'}">
										<i class="glyphicon glyphicon-ok" ng-class="emp.selected ? 'glyphicon glyphicon-ok': 'glyphicon glyphicon-remove'"></i>
										{{emp.empName}}
									</a>
								</div>
			            	</div>
			            </div>
			            <div class="form-group">
							<label class="col-md-2 control-label">备注：</label>
							<div class="col-md-10">
								<textarea rows="1" class="form-control" ng-model="task.comment"></textarea>
			            	</div>
			            </div>
			            <div class="form-group">
							<label class="col-md-2 control-label">照片：</label>
							<div class="col-md-10">
								<div ed-uploader data-options="text:' 文件上传',multiple: true,maxLength:4,accept:'image/*'" class="ng-uploader" ng-model="task.files" ed-upload-dir="ad"></div> 						 
								<div class="mix-grid" style="height: 120px;width:100%;display: inline-block;overflow: auto;padding: 2px;border: 1px solid #ddd;" >
								 	<div class="mix" style="display: inline;opacity: 1;padding-right: 5px;float:left;" ng-repeat="img in task.files">
			                    		<div class="mix-inner">
											<img class="img-responsive" ng-src="{{setting.nginxPath+img.path}}" alt="" style="width:150px;height:120px">
											<div class="mix-details" style="height:50%;">
												<a class="mix-link" ng-click="grid.removeImg(img);">
													<i class="fa fa-close" ></i>
												</a>
												<a class="mix-preview fancybox-button" ng-href="{{setting.nginxPath+img.path}}" data-rel="fancybox-button">
													<i class="fa fa-search"></i>
												</a>
											</div>
										</div>
									</div>
								</div>
			            	</div>
			            </div>
			        </div>
			    </form>
			</div>
			<div class="form-actions">
				<button type="button" class="btn default" ng-click="grid.cancel();">
	                <i class="fa fa-times"></i> 取消
	            </button>
	            <button type="button" class="btn blue" ng-click="grid.submitTask();">
	                <i class="fa fa-times"></i> 提交
	            </button>
	        </div>
		</div>
	</div>
</div>

<div ed-modal="taskViewModal" data-options="title: '任务详情', static: true, width: 1000, defaultButton:false,onHidden:'reset'">
	<form style="display: none;"><div class="form-actions"></div></form>
	<div class="portlet" style="margin-bottom: 0px;">
		<div class="portlet-body">
			<div style="border: 1px solid #ddd;margin: 10px 0px;position: relative;">
				<span style="padding: 2px 5px;position: absolute;top: -10px; left:10px;background-color: #fff;">胶贴制作明细</span>
				<form class="form-horizontal">
					<div class="form-body">
						<div class="form-group">
							<label class="col-md-2 control-label">车牌号：</label>
							<div class="col-md-2">
								<p class='form-control-static'>{{orderItem.busPlateNo}}</p>
			            	</div>
			            	<label class="col-md-2 control-label">自编号：</label>
							<div class="col-md-2">
								<p class='form-control-static'>{{orderItem.busVehicleNo}}</p>
			            	</div>
			            	<label class="col-md-2 control-label">车型：</label>
							<div class="col-md-2">
								<p class='form-control-static'>{{orderItem.busType}}</p>
			            	</div>
			            </div>
			        	<div class="form-group">
							<label class="col-md-2 control-label">所属公司：</label>
							<div class="col-md-2">
								<p class='form-control-static'>{{orderItem.busCompany}}</p>
			            	</div>
			            	<label class="col-md-2 control-label">线路：</label>
							<div class="col-md-2">
								<p class='form-control-static'>{{orderItem.busLineName}}</p>
			            	</div>
			            	<label class="col-md-2 control-label">发布形式：</label>
							<div class="col-md-2">
								<p class='form-control-static'>{{orderItem.publishType | code : 'bus_ad_type'}}</p>
			            	</div>
			            </div>
			            <div class="form-group">
							<label class="col-md-2 control-label">广告内容：</label>
							<div class="col-md-2">
								<p class='form-control-static'>{{orderItem.adName}}</p>
			            	</div>
			            	<label class="col-md-2 control-label">胶贴形式：</label>
							<div class="col-md-2">
								<p class='form-control-static'>{{orderItem.stickerType | code : 'sticker_type'}}</p>
			            	</div>
			            	<label class="col-md-2 control-label">交货时间：</label>
							<div class="col-md-2">
								<p class='form-control-static'>{{orderItem.stickerDate | limitTo : 10}}</p>
			            	</div>
			            </div>
			            <div class="form-group" style="margin-bottom: 0px;">
			            	<label class="col-md-2 control-label">裁图时间：</label>
							<div class="col-md-2">
								<p class='form-control-static'>{{orderItem.caituDate | limitTo : 10}}</p>
			            	</div>
			            	<label class="col-md-2 control-label">裁图面积：</label>
							<div class="col-md-2">
								<p class='form-control-static'>{{orderItem.caituArea}}</p>
			            	</div>
			            	<label class="col-md-2 control-label">裁图员：</label>
							<div class="col-md-2">
								<p class='form-control-static'>{{orderItem.caituEmpName}}</p>
			            	</div>
			            </div>
			            <div class="form-group" style="margin-bottom: 0px;">
			            	<label class="col-md-2 control-label">打印时间：</label>
							<div class="col-md-2">
								<p class='form-control-static'>{{orderItem.printDate | limitTo : 10}}</p>
			            	</div>
			            	<label class="col-md-2 control-label">打印机号：</label>
							<div class="col-md-2">
								<p class='form-control-static'>{{orderItem.printMachineNo}}精度：{{orderItem.printAccuracy}}</p>
			            	</div>
			            	<label class="col-md-2 control-label">打印员：</label>
							<div class="col-md-2">
								<p class='form-control-static'>{{orderItem.printEmpName}}</p>
			            	</div>
			            </div>
			            <div class="form-group" style="margin-bottom: 0px;" ng-if="t.status == '2'">
			            	<label class="col-md-2 control-label">覆膜时间：</label>
							<div class="col-md-6">
								<p class='form-control-static'>{{orderItem.fumoDate | limitTo : 10}}</p>
			            	</div>
			            	<label class="col-md-2 control-label">覆膜员：</label>
							<div class="col-md-2">
								<p class='form-control-static'>{{orderItem.fumoEmpName}}</p>
			            	</div>
			            </div>
			        </div>
				</form>
			</div>
			<div style="border: 1px solid red;margin: 10px 0px;position: relative;">
				<span style="padding: 2px 5px;position: absolute;top: -10px; left:10px;background-color: #fff;color:red;">上刊制作</span>
			    <form class="form-horizontal">
					<div class="form-body">
						<div class="form-group" ng-if="task.status == '2'">
							<label class="col-md-2 control-label">{{task.groupName}}：</label>
							<div class="col-md-10">
								<div class='form-control-static'>
									<span ng-repeat="worker in task.workers" style="margin-right: 10px;padding: 2px 5px;text-decoration: none;color:#333;background-color:orange">
										<i class="glyphicon glyphicon-ok"></i>
										{{worker.empName}}
									</span>
								</div>
			            	</div>
			            </div>
			            <div class="form-group" ng-if="task.status == '2'">
							<label class="col-md-2 control-label">备注：</label>
							<div class="col-md-10">
								<div class='form-control-static'>{{task.comment}}</div>
			            	</div>
			            </div>
			            <div class="form-group" ng-if="task.status == '2'">
							<label class="col-md-2 control-label">照片：</label>
							<div class="col-md-10">
								<div class="mix-grid" style="height: 140px;width:100%;display: inline-block;overflow: auto;" >
								 	<div class="mix" style="display: inline;opacity: 1;padding-right: 5px;float:left;" ng-repeat="img in task.files">
			                    		<div class="mix-inner">
											<img class="img-responsive" ng-src="{{setting.nginxPath+img.filePath}}" alt="" style="width:150px;height:120px">
											<div class="mix-details" style="height:50%;">
												<a class="mix-preview fancybox-button" ng-href="{{setting.nginxPath+img.filePath}}" data-rel="fancybox-button">
													<i class="fa fa-search"></i>
												</a>
											</div>
										</div>
									</div>
								</div>
			            	</div>
			            </div>
			            <div class="form-group" style="margin-bottom: 0px;" ng-if="t.status == '1'">
			            	<label class="col-md-2 control-label">制作组：</label>
							<div class="col-md-2">
								<div class='form-control-static'>
								 <span>{{task.groupName}}</span>
								【<span ng-repeat="worker in task.workers" style="margin-right: 10px;padding: 2px 5px;text-decoration: none;color:#333;background-color:orange">
									<i class="glyphicon glyphicon-ok"></i>
									{{worker.empName}}
								</span>
								-未完成</div>
			            	</div>
			            </div>
			        </div>
			    </form>
			</div>
		</div>
	</div>
</div>


